<table border="0" cellspacing="1" cellpadding="1">  
  <tr>
    <th> </th>  
    <th>内容</th>    
    <th>创建于</th>
    <th>
      操作
      <div id='user_<%= @user.id %>_feeds_menu' class='menu' style='display:none'>
        <div>
          <%= link_to_remote '淘宝消费送麦粒',
                :update => "feeds_#{@user.id}",
                :url => new_consume_in_taobao_feed_user_url(@user),
                :method => :get,
                :loading => small_loading("add_taobao_feed_#{@user.id}_link", :only_img => true),
                :html => {
                  :id => "add_taobao_feed_#{@user.id}_link"
                }
          %>
          <%= link_to_remote '刷新',
                :update => "feeds_#{@user.id}",
                :url => feeds_user_url(@user),
                :method => :get,
                :loading => small_loading("feeds_#{@user.id}_link", :only_img => true),
                :html => {
                  :id => "feeds_#{@user.id}_link"
                }
          %>  
        </div>        
      </div>
    </th>
  </tr>
  <% @feeds.each_with_index do |feed,index| %>
  <tr>
    <td align='right'><%= index + 1 %>.</td>
    <td>
      <%= feed_to_html feed %>
    </td>
    <td><%= time_ago_in_words feed.created_at %>前</td>
    <td>
      <%= link_to_remote '删除',
            :url => destroy_consume_in_taobao_feed_user_url(feed),
            :method => :delete,
            :loading => small_loading("destroy_feed_#{feed.id}_link", :only_img => true),
            :complete => remote_function(
              :update => "feeds_#{@user.id}",
              :url => feeds_user_url(@user.id),
              :method => :get
            ),
            :html => {
              :id => "destroy_feed_#{feed.id}_link"
            } if feed.consume_in_taobao? and feed.called_back_by_feed.nil?
       %>
    </td>
  </tr>
  <% end %>
  <% if @feeds.empty? %>
  <tr>
    <td colspan='4' align='center'>无</td>
  </tr>
  <% end %>
</table>